
  <!-- Content Wrapper. Contains page content -->
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        宠物品种
        <small>Control panel</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制台</a></li>
        <li class="active">广告图</li>
      </ol>
    </section>



    <!-- Main content -->
    <section class="content">

      <div class="row">
        <div class="col-md-12">
          <!-- Horizontal Form -->
          <div class="box box-info">
            <div class="box-header with-border">
              <h3 class="box-title">添加宠物品种</h3>
              <a href="{:url('admin/user/index')}" class="pull-right btn btn-primary"><i class="glyphicon glyphicon-share-alt"></i>&nbsp;返回</a>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <form action="{:url('admin/varieties/edit',['id'=>$varieties['v_id']])}" method="post"  enctype="multipart/form-data" class="form-horizontal">
              <div class="box-body">

                <div class="row text-center" style="margin-bottom: 20px;vertical-align: middle;">
                  <div class="col-lg-5 col-lg-offset-1" id="preview">
                    <img id="imghead" border="0" src="__UPLOAD__<?php echo $varieties['v_img']; ?>" style="width: 250px;width: 200px;" onclick="$('#previewImg').click();">
                    <label for="" style="margin-right: 20px;">封面图片</label>
                  </div>
                  <input type="file" name="image[]" onchange="previewImage(this,300,250)" style="display: none;" id="previewImg">

                  <div class="col-lg-6" id="preview1">
                    <img id="imghead1" border="0" src="__UPLOAD__<?php echo $varieties['v_img_con']; ?>" style="width: 350px;height: 280px;" width="150" height="150" onclick="$('#previewImg1').click();">
                    <label for="" style="margin-right: 20px;">详细图片</label>
                  </div>
                  <input type="file" name="image[]" onchange="previewImage1(this,300,250)" style="display: none;" id="previewImg1">
                </div>

                <div class="form-group">
                  <label for="name" class="col-sm-2 control-label">宠物名称</label>

                  <div class="col-sm-9">
                    <input type="text" class="form-control" name="petname" id="name" value="<?php echo $varieties['petname']; ?>">
                  </div>
                  <a id="b_link_mes"  style="color: red;line-height: 34px;font-size: 12px;"></a>
                </div>
                <div class="form-group">
                  <label for="v_name" class="col-sm-2 control-label">英文名称</label>

                  <div class="col-sm-9">
                    <input type="text" class="form-control" name="v_name" id="v_name" value="<?php echo $varieties['v_name']; ?>">
                  </div>
                  <a id="v_name_mes"  style="color: red;line-height: 34px;font-size: 12px;"></a>
                </div>
                <div class="form-group">
                  <label for="v_title" class="col-sm-2 control-label">简介</label>

                  <div class="col-sm-9">
                    <input type="text" class="form-control" name="v_title" id="v_title" value="<?php echo $varieties['v_title']; ?>">
                  </div>
                  <a id="v_title_mes"  style="color: red;line-height: 34px;font-size: 12px;"></a>
                </div>

                <div class="form-group">
                  <label for="content" class="col-sm-2 control-label" >内容</label>

                  <div class="col-sm-9">
                    <script id="container" name="v_content" type="text/plain">
                        <?php echo $varieties['v_content']; ?>
                    </script>
                    <!-- 配置文件 -->
                    <script type="text/javascript" src="__UEDITOR__ueditor.config.js"></script>
                    <!-- 编辑器源码文件 -->
                    <script type="text/javascript" src="__UEDITOR__ueditor.all.js"></script>
                    <!-- 实例化编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('container');
                    </script>

                  </div>

                </div>


              </div>
              <!-- /.box-body -->
              <div class="box-footer">
                <div class="col-sm-2">
                  <button type="reset" class="btn btn-default">重置</button>
                </div>

                <div class="col-sm-9">
                  <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>

              </div>
              <!-- /.box-footer -->
            </form>
          </div>
          <!-- /.box -->
        </div>
        <!--/.col (right) -->
      </div>

    </section>
    <!-- /.content -->
  </div>


  <script>
      $("#name").blur(function(){
          if($(this).val()==0){
              $("#b_link_mes").html('*请填写宠物名称');
              return false;
          }

      });
      $("#name").focus(function(){
              $("#b_link_mes").html('');
      });

      $("#v_name").blur(function(){
          if($(this).val()==0){
              $("#v_name_mes").html('*请填写英文名称');
              return false;
          }

      });
      $("#v_name").focus(function(){
          $("#v_name_mes").html('');
      });

      $("#v_title").blur(function(){
          if($(this).val()==0){
              $("#v_title_mes").html('*请填写简介');
              return false;
          }
      });
      $("#v_title").focus(function(){
          $("#v_title_mes").html('');
      });
  </script>